package com.easy.ui.query;

import com.easy.base.present.BasePresenter;
import com.easy.bean.AbQueryBean;

public class QueryPresent extends BasePresenter<QueryModel, QueryView> implements QueryModel.CallBack {

    public void query(String code) {
        view.showProgress();
        model.query(code,this);
    }

    @Override
    public void onquerySuccess(AbQueryBean abQueryBean) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.query(abQueryBean);
    }

    @Override
    public void onFail(String str) {
        if(view==null){
            return;
        }
        view.hideProgress();
        view.showMsg(str);
    }
}


